package com.ucode.dcse;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.otter.canal.protocol.CanalEntry;

public class TableCanalData {

    /**
     * canal instances key
     */
    private String destination;
    
    /**
     * 事件类型，参考CanalEntry.EventType枚举
     */
    private CanalEntry.EventType eventType;
    /**
     * 数据库实例名称
     */
    private String schemaName;
    /**
     * 数据库表名称
     */
    private String tableName;
    
    /**
     * insert只有after columns, delete只有before columns，而update则会有before / after columns数据.
     * sqls、datas、afterDatas数组的下标位置都一一对应
     */
    private JSONArray afterDatas;
    
    /**
     * insert只有after columns, delete只有before columns，而update则会有before / after columns数据.
     * sqls、datas、afterDatas数组的下标位置都一一对应
     */
    private JSONArray beforeDatas;
    
    public String getDestination() {
        return destination;
    }
    public void setDestination(String destination) {
        this.destination = destination;
    }
    public CanalEntry.EventType getEventType() {
        return eventType;
    }
    public void setEventType(CanalEntry.EventType eventType) {
        this.eventType = eventType;
    }
    public String getSchemaName() {
        return schemaName;
    }
    public void setSchemaName(String schemaName) {
        this.schemaName = schemaName;
    }
    public String getTableName() {
        return tableName;
    }
    public void setTableName(String tableName) {
        this.tableName = tableName;
    }
    public JSONArray getAfterDatas() {
        return afterDatas;
    }
    public void setAfterDatas(JSONArray afterDatas) {
        this.afterDatas = afterDatas;
    }
    public JSONArray getBeforeDatas() {
        return beforeDatas;
    }
    public void setBeforeDatas(JSONArray beforeDatas) {
        this.beforeDatas = beforeDatas;
    }

}
